//
//  MasonryViewController.m
//  MyCloudMusic
//
//  Created by pub on 2024/6/8.
//

#import "MasonryViewController.h"
#import <Masonry.h>
@interface MasonryViewController ()
@property(nonatomic, strong)UIView *container;
@end

@implementation MasonryViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.container = [UIView new];
    
    self.container.backgroundColor = [UIColor greenColor];
    
    [self.view addSubview:self.container];
    
    UIImageView *imageView = [UIImageView new];
    imageView.image = [UIImage imageNamed:@"Logo"];
    [self.container addSubview:imageView];
    
    
#pragma mark 布局约束
    [self.container mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop).offset(16);
            make.left.equalTo(self.view.mas_safeAreaLayoutGuideLeft).offset(16);
            make.right.equalTo(self.view.mas_safeAreaLayoutGuideRight).offset(-16);
            make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom).offset(-16);
    }];
    
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.mas_equalTo(100);
            make.height.mas_equalTo(100);
            make.top.mas_equalTo(100);
            make.centerX.equalTo(self.view);
    }];
}



@end
